package com.yyfax.pay.depository.dao;

import org.apache.ibatis.annotations.Param;

import com.yyfax.pay.depository.domain.FuiouFileDownload;

/**
 * 文件下载持久化接口
 * 
 * @author buyi
 * @date 2017-09-29 09:43:09
 * @since v2.0.0
 */
public interface FuiouFileDownloadDao {

	/**
	 * 保存实体
	 * 
	 * @author buyi
	 * @date 2017-09-29 09:43:45
	 * @since v2.0.0
	 * @param record
	 * @return
	 */
	int insert(FuiouFileDownload record);

	/**
	 * 根据业务主键查询实体
	 * 
	 * @author buyi
	 * @date 2017-09-29 09:44:24
	 * @since v2.0.0
	 * @param busiId
	 * @return
	 */
	FuiouFileDownload selectByPrimaryKey(String busiId);

	/**
	 * 查询下载记录
	 * 
	 * @author buyi
	 * @date 2017-09-20 15:26:14
	 * @since v2.0.0
	 * @param merchantCode
	 * @param orderId
	 * @return
	 */
	public FuiouFileDownload selectByMerchantCodeAndOrderId(@Param("merchantCode") String merchantCode, @Param("orderId") String orderId);

	/**
	 * 更新状态
	 * 
	 * @author buyi
	 * @date 2017-09-07 15:21:33
	 * @since v2.0.0
	 * @param busiId
	 * @param origState 源状态
	 * @param destState 目标状态
	 * @param rspCode
	 * @param rspMsg
	 * @return
	 */
	public int updateStateSelective(@Param("busiId") String busiId, @Param("origState") String origState, @Param("destState") String destState,
			@Param("rspCode") Integer rspCode, @Param("rspMsg") String rspMsg);
}